<template>
  <image
      class="image"
      :src="labels[label]"
      :style="'width:'+width+'rpx; height:'+height+'rpx;'"
  ></image>
</template>

<script>
export default {
  name: "LabelCom",
  props: {
    // vip_price,pop,hot,subsidy,hongkong_direct,overseas_direct,sf
    label: {
      type: String,
      default: 'vip_price'
    },
    width: {
      type: Number,
      default: 20
    },
    height: {
      type: Number,
      default: 20
    }
  },
  data: () => ({
    labels: {
      vip_price: 'https://littleshop.oss-cn-beijing.aliyuncs.com/images/mini/labels/price-vip-red.png',
      pop: 'https://littleshop.oss-cn-beijing.aliyuncs.com/images/mini/labels/product-pop.png',
      hot: 'https://littleshop.oss-cn-beijing.aliyuncs.com/images/mini/labels/product-hot.png',
      subsidy: 'https://littleshop.oss-cn-beijing.aliyuncs.com/images/mini/labels/product-subsidy.png',
      hongkong_direct: 'https://littleshop.oss-cn-beijing.aliyuncs.com/images/mini/labels/product-hangkong.png',
      overseas_direct: 'https://littleshop.oss-cn-beijing.aliyuncs.com/images/mini/labels/product-overseas.png',
      sf: 'https://littleshop.oss-cn-beijing.aliyuncs.com/images/mini/labels/product-sf.png'
    }
  })
}
</script>

<style lang="scss" scoped>
.image{
	position: relative;
	top:5rpx;
	margin-right: 8rpx;
}
</style>
